import request from '@/utils/request'
import defaultSettings from '@/settings'
import { praseStrEmpty } from '@/utils/ruoyi'

//自由格式查询
export const apiUrlConfigQuery = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/bsInformation/freeFormat/FreeFormatQuery/search`,
}

//自由格式审核查询
export const apiUrlConfigApprove = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/bsInformation/freeFormat/FreeFormatApprove/search`,
}


// 查询自由格式详细
export function findFreeFormatDeatil(id) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/freeFormat/FreeFormatQuery/detail?id=` + praseStrEmpty(id),
    method: 'get'
  })
}

// 查询自由格式审核详细
export function findFreeApproveDeatil(id) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/freeFormat/FreeFormatApprove/detail?id=` + praseStrEmpty(id),
    method: 'get'
  })
}

// 自由格式审核通过
export function findFreeApproveApprvoe(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/freeFormat/FreeFormatApprove/approve`,
    method: 'post',
    data:data
  })
}

// 自由格式审核拒绝
export function findFreeApproveReject(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/freeFormat/FreeFormatApprove/reject`,
    method: 'post',
    data:data
  })
}


// 自由格式录入
export function findFreeEntry(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/bsInformation/freeFormat/FreeFormatEntry/save`,
    method: 'post',
    data:data
  })
}
